import Vue from "vue";
import App from "./App.vue";
import router from "@/router";
import store from "@/store";
import "@/pages/Index/rem.js";
import { rewriteConsole } from "@/tools/index";
// 过滤器
import * as filters from "@/filter/filter.js";
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});
// echarts
import echarts from "echarts";
Vue.prototype.$echarts = echarts;
Vue.prototype.$global = {
  ws: {},
  setWs: function(newWs) {
    this.ws = newWs;
  },
};
// icon字体
import "@/assets/iconfont/iconfont.js";
// css文件
import "@/assets/css/common.css";
import "@/assets/css/vant.css";
import "@/assets/css/animate.css";
import "@/assets/iconfont/iconfont.css";
// 插件
import publicPlugins from "@/plugins/publicPlugins.js";
Vue.use(publicPlugins);
// 重写console对象
if (process.env.NODE_ENV === "production") {
  rewriteConsole();
}
// vant 框架
import Vant from "vant";
import "vant/lib/index.css";
Vue.use(Vant);

Vue.config.productionTip = false;
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#Index");
